<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{studyProgramController.selected.studyProgramName}" rendered="#{localeHelper.englishSet}" />
            <h:outputText value="#{studyProgramController.selected.studyProgramName}" rendered="#{localeHelper.norwegianSet}" />
        </ui:define>
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.name}:" />
                    <h:outputText value="#{studyProgramController.selected.studyProgramName}" title="#{bundle.name}" rendered="#{localeHelper.englishSet}" />
                    <h:outputText value="#{studyProgramController.selected.studyProgramNameNo}" title="#{bundle.name}" rendered="#{localeHelper.norwegianSet}" />
                    <h:outputText value="#{bundle.approved}:" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value="#{studyProgramController.selected.approved}" title="#{bundle.approved}"  rendered="#{request.remoteUser!=null}">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.approvedBy}:" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value="#{studyProgramController.selected.approvedBy}" title="#{bundle.approvedBy}" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value="#{bundle.revised}:" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value="#{studyProgramController.selected.revised}" title="#{bundle.revised}" rendered="#{request.remoteUser!=null}">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.revisedBy}:" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value="#{studyProgramController.selected.revisedBy}" title="#{bundle.revisedBy}" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value="#{bundle.nationalFramework}:" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value="#{studyProgramController.selected.nationalFramework}" title="#{bundle.nationalFramework}" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value="#{bundle.faculty}:"/>
                    <h:outputText value="#{studyProgramController.selected.faculty.facultyName}" title="#{bundle.faculty}" rendered="#{localeHelper.englishSet}"/>
                    <h:outputText value="#{studyProgramController.selected.faculty.facultyNameNo}" title="#{bundle.faculty}" rendered="#{localeHelper.norwegianSet}"/>
                    <h:outputText value="#{bundle.courses}:" />
                    <h:outputText rendered="#{studyProgramController.selected.courseCollection.size() == 0}" value="#{bundle.noCourses}" />
                    <h:dataTable rendered="#{studyProgramController.selected.courseCollection.size() > 0}" value="#{studyProgramController.selected.courseCollection}" var="course" border="0" cellpadding="2" cellspacing="0" rules="all" style="border:solid 0px">
                        <h:column>
                            <h:outputText value="#{course.courseName}"/>
                        </h:column>
                    </h:dataTable>
                </h:panelGrid>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
